<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<style>

    #bootstrap-table tr:nth-child(even) {
        background: transparent !important;
    }

    #bootstrap-table th {
        background: transparent !important;
    }

    #bootstrap-table a {
        width: 100%;
        height: 100%;
        display: block;
        color: #000000;
    }

    #bootstrap-table a:hover {
        color: #000000;
    }

    #bootstrap-table a:visited {
        color: #000000;
    }

    #bootstrap-table a:active {
        color: #000000;
    }

    .statusStyle {
        width: 120px;
    }
</style>
<body class="hold-transition skin-yellow sidebar-mini">
<section class="content-header">
    <h1>总调计划查询</h1>
</section>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <form id="queryForm" class="form-horizontal">
                        <div class="row">
                            <div class="form-inline">
                                <div class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;">
                                    <label class="control-label">
                                        项目编号
                                    </label>
                                    <label class="control-label">
                                        <input name="proCode" class="form-control" type="text" maxlength="255"
                                               value=""
                                               placeholder="请输入项目编号"/>
                                    </label>
                                </div>
                                <div class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;">
                                    <label class="control-label">
                                        项目名称
                                    </label>
                                    <label class="control-label">
                                        <input name="proName" class="form-control" type="text" maxlength="255"
                                               placeholder="请输入项目名称"/>
                                    </label>
                                </div>
                                <div class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;">
                                    <label class="control-label">
                                        项目数量
                                    </label>
                                    <label class="control-label">
                                        <input name="proQty" class="form-control" type="text" maxlength="255"
                                               oninput="value=value.replace(/^(0+)|[^\d]+/g,'')"
                                               placeholder="请输入项目数量"/>
                                    </label>
                                </div>
                                <div class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;">
                                    <label class="control-label">
                                        需方
                                    </label>
                                    <label class="control-label">
                                        <input name="customer" class="form-control" type="text" maxlength="255"
                                               placeholder="请输入需方"/>
                                    </label>
                                </div>
                                <div class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;">
                                    <label class="control-label">
                                        安装地点
                                    </label>
                                    <label class="control-label">
                                        <input name="installationSite" class="form-control" type="text" maxlength="255"
                                               placeholder="请输入安装地点"/>
                                    </label>
                                </div>
                                <div class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;">
                                    <label class="control-label">
                                        是否重点项目
                                    </label>
                                    <label class="control-label">
                                        <select name="prodIsKey" class="form-control">
                                            <option value="" selected="selected">全部</option>
                                            <option value="0">是</option>
                                            <option value="1">否</option>
                                        </select>
                                    </label>
                                </div>
                                <div class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;">
                                    <label class="control-label">
                                        生产令状态
                                    </label>
                                    <label class="control-label">
                                        <select name="prodManSta" class="form-control">
                                            <option value="1" selected="selected">正常</option>
                                            <option value="2">终止</option>
                                            <option value="3">暂缓</option>
                                        </select>
                                    </label>
                                </div>
                                <div class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;">
                                    <label class="control-label">交货时间</label>
                                    <label class="control-label">
                                        <input type="text" class="form-control datepicker" name="delStartTime"
                                               readonly="readonly"/>
                                        <span> 至 </span>
                                        <input type="text" class="form-control datepicker" name="delEndTime"
                                               readonly="readonly"/></label>
                                </div>
                                <!--                                <div id="div-design-time" class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;display: none">-->
                                <!--                                    <label class="control-label">技术资料下达完成时间</label>-->
                                <!--                                    <label class="control-label">-->
                                <!--                                        <input type="text" class="form-control datepicker" name="designStartTime"-->
                                <!--                                               readonly="readonly"/>-->
                                <!--                                        <span> 至 </span>-->
                                <!--                                        <input type="text" class="form-control datepicker" name="designEndTime"-->
                                <!--                                               readonly="readonly"/></label>-->
                                <!--                                </div>-->
                                <!--                                <div id="div-craft-time" class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;display: none">-->
                                <!--                                    <label class="control-label">工艺下计划完成时间</label>-->
                                <!--                                    <label class="control-label">-->
                                <!--                                        <input type="text" class="form-control datepicker" name="craftStartTime"-->
                                <!--                                               readonly="readonly"/>-->
                                <!--                                        <span> 至 </span>-->
                                <!--                                        <input type="text" class="form-control datepicker" name="craftEndTime"-->
                                <!--                                               readonly="readonly"/></label>-->
                                <!--                                </div>-->
                                <!--                                <div id="div-pur-time" class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;display: none">-->
                                <!--                                    <label class="control-label">外购件计划完成时间</label>-->
                                <!--                                    <label class="control-label">-->
                                <!--                                        <input type="text" class="form-control datepicker" name="purStartTime"-->
                                <!--                                               readonly="readonly"/>-->
                                <!--                                        <span> 至 </span>-->
                                <!--                                        <input type="text" class="form-control datepicker" name="purEndTime"-->
                                <!--                                               readonly="readonly"/></label>-->
                                <!--                                </div>-->
                                <!--                                <div id="div-out-time" class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;display: none">-->
                                <!--                                    <label class="control-label">外协件计划完成时间</label>-->
                                <!--                                    <label class="control-label">-->
                                <!--                                        <input type="text" class="form-control datepicker" name="outStartTime"-->
                                <!--                                               readonly="readonly"/>-->
                                <!--                                        <span> 至 </span>-->
                                <!--                                        <input type="text" class="form-control datepicker" name="outEndTime"-->
                                <!--                                               readonly="readonly"/></label>-->
                                <!--                                </div>-->
                                <!--                                <div id="div-rawMat-time" class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;display: none">-->
                                <!--                                    <label class="control-label">原材料计划完成时间</label>-->
                                <!--                                    <label class="control-label">-->
                                <!--                                        <input type="text" class="form-control datepicker" name="rawMatStartTime"-->
                                <!--                                               readonly="readonly"/>-->
                                <!--                                        <span> 至 </span>-->
                                <!--                                        <input type="text" class="form-control datepicker" name="rawMatEndTime"-->
                                <!--                                               readonly="readonly"/></label>-->
                                <!--                                </div>-->
                                <!--                                <div id="div-processPlanning-time" class="form-group margin-bottom-none" style="margin-left:0px;margin-right: 25px;display: none">-->
                                <!--                                    <label class="control-label">工艺编制完成时间</label>-->
                                <!--                                    <label class="control-label">-->
                                <!--                                        <input type="text" class="form-control datepicker"-->
                                <!--                                               name="processPlanningStartTime"-->
                                <!--                                               readonly="readonly"/>-->
                                <!--                                        <span> 至 </span>-->
                                <!--                                        <input type="text" class="form-control datepicker" name="processPlanningEndTime"-->
                                <!--                                               readonly="readonly"/></label>-->
                                <!--                                </div>-->
                                <div id="div-cut-time" class="form-group margin-bottom-none"
                                     style="margin-left:0px;margin-right: 25px;display: none">
                                    <label class="control-label">下料完成时间</label>
                                    <label class="control-label">
                                        <input type="text" class="form-control datepicker" name="cutStartTime"
                                               readonly="readonly"/>
                                        <span> 至 </span>
                                        <input type="text" class="form-control datepicker" name="cutEndTime"
                                               readonly="readonly"/></label>
                                </div>
                                <div id="div-reflowWeldment-time" class="form-group margin-bottom-none"
                                     style="margin-left:0px;margin-right: 25px;display: none">
                                    <label class="control-label">返焊件完成时间</label>
                                    <label class="control-label">
                                        <input type="text" class="form-control datepicker"
                                               name="reflowWeldmentStartTime"
                                               readonly="readonly"/>
                                        <span> 至 </span>
                                        <input type="text" class="form-control datepicker" name="reflowWeldmentEndTime"
                                               readonly="readonly"/></label>
                                </div>
                                <div id="div-rivetingAndWeldingOfMachiningParts-time"
                                     class="form-group margin-bottom-none"
                                     style="margin-left:0px;margin-right: 25px;display: none">
                                    <label class="control-label">机加件（铆焊）完成时间</label>
                                    <label class="control-label">
                                        <input type="text" class="form-control datepicker"
                                               name="rivetingAndWeldingOfMachiningPartsStartTime"
                                               readonly="readonly"/>
                                        <span> 至 </span>
                                        <input type="text" class="form-control datepicker"
                                               name="rivetingAndWeldingOfMachiningPartsEndTime"
                                               readonly="readonly"/></label>
                                </div>
                                <div id="div-rivetingAndWeldingParts-time" class="form-group margin-bottom-none"
                                     style="margin-left:0px;margin-right: 25px;display: none">
                                    <label class="control-label">铆焊件完成时间</label>
                                    <label class="control-label">
                                        <input type="text" class="form-control datepicker"
                                               name="rivetingAndWeldingPartsStartTime"
                                               readonly="readonly"/>
                                        <span> 至 </span>
                                        <input type="text" class="form-control datepicker"
                                               name="rivetingAndWeldingPartsEndTime"
                                               readonly="readonly"/></label>
                                </div>
                                <div id="div-machining-time" class="form-group margin-bottom-none"
                                     style="margin-right: 25px;display: none">
                                    <label class="control-label">机加完成时间</label>
                                    <label class="control-label">
                                        <input type="text" class="form-control datepicker" name="machiningStartTime"
                                               readonly="readonly"/>
                                        <span> 至 </span>
                                        <input type="text" class="form-control datepicker" name="machiningEndTime"
                                               readonly="readonly"/></label>
                                </div>
                                <div id="div-assembling-time" class="form-group margin-bottom-none"
                                     style="margin-right: 25px;display: none">
                                    <label class="control-label">装配完成时间</label>
                                    <label class="control-label">
                                        <input type="text" class="form-control datepicker" name="assemblingStartTime"
                                               readonly="readonly"/>
                                        <span> 至 </span>
                                        <input type="text" class="form-control datepicker" name="assemblingEndTime"
                                               readonly="readonly"/></label>
                                </div>
                                <div id="div-deliver-time" class="form-group margin-bottom-none"
                                     style="margin-right: 25px;display: none">
                                    <label class="control-label">发货完成时间</label>
                                    <label class="control-label">
                                        <input type="text" class="form-control datepicker" name="deliverStartTime"
                                               readonly="readonly"/>
                                        <span> 至 </span>
                                        <input type="text" class="form-control datepicker" name="deliverEndTime"
                                               readonly="readonly"/></label>
                                </div>
                                <div id="div-install-time" class="form-group margin-bottom-none"
                                     style="margin-right: 25px;display: none">
                                    <label class="control-label">安装完成时间</label>
                                    <label class="control-label">
                                        <input type="text" class="form-control datepicker" name="installStartTime"
                                               readonly="readonly"/>
                                        <span> 至 </span>
                                        <input type="text" class="form-control datepicker" name="installEndTime"
                                               readonly="readonly"/></label>
                                </div>
                                <button id="btn-search-display"
                                        type="button"
                                        class="btn btn-success"
                                        style="min-width:50px!important;height:34px;"
                                        onclick="disPlaySearch(this)">
                                    <i id="btn-search-display-i" class="fa fa-plus"></i>
                                </button>
                                <button id="btn-search" type="button" class="btn btn-success">
                                    搜索
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="box-body">
                    <table id="bootstrap-table"></table>
                </div>
            </div>
        </div>
    </div>
</section>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    let table;
    $(function () {
        /**
         * 加载列表
         */
        table = js.table.init({
            url: ctx + "task/planQuery/list",
            showColumns: true,
            showExport: true,
            columns: [
                {
                    title: '序号', width: '60',
                    formatter: function (value, row, index, field) {
                        var pageSize = table.bootstrapTable('getOptions').pageSize;
                        var pageNumber = table.bootstrapTable('getOptions').pageNumber;
                        return pageSize * (pageNumber - 1) + index + 1;
                    }, cellStyle: function (value, row, index) {
                        return {css: {"background": "#FFFFFF"}}
                    }
                },
                {
                    title: '项目编号', field: 'proCode', width: '120',
                    formatter: function (value, row, index) {
                        if (value != null) {
                            return value;
                        } else {
                            return '--';
                        }
                    }, cellStyle: function (value, row, index) {
                        return {css: {"background": "#FFFFFF"}}
                    }
                },
                {
                    title: '项目名称', field: 'proName',
                    formatter: function (value, row, index) {
                        if (value != null) {
                            return value;
                        } else {
                            return '--';
                        }
                    }, cellStyle: function (value, row, index) {
                        return {css: {"background": "#FFFFFF"}}
                    }
                },
                {
                    title: '项目数量', field: 'proQty',
                    formatter: function (value, row, index) {
                        if (value != null) {
                            return value;
                        } else {
                            return '--';
                        }
                    }, cellStyle: function (value, row, index) {
                        return {css: {"background": "#FFFFFF"}}
                    }
                },
                {
                    title: '需方', field: 'customer',
                    formatter: function (value, row, index) {
                        if (value != null) {
                            return value;
                        } else {
                            return '--';
                        }
                    }, cellStyle: function (value, row, index) {
                        return {css: {"background": "#FFFFFF"}}
                    }
                },
                {
                    title: '安装地点', field: 'installationSite',
                    formatter: function (value, row, index) {
                        if (value != null) {
                            return value;
                        } else {
                            return '--';
                        }
                    }, cellStyle: function (value, row, index) {
                        return {css: {"background": "#FFFFFF"}}
                    }
                },
                {
                    title: '交货时间', field: 'prodDelDat',
                    formatter: function (value, row, index) {
                        if (value != null) {
                            return '<a style="width: 80px;" href="javascript:void(0)">' + value + '</a>';
                        } else {
                            return '--';
                        }
                    },
                    cellStyle: function (value, row, index) {
                        return {css: {"background": "#FFFFFF"}}
                    }
                },
                {
                    title: '是否重点', field: "prodIsKey",
                    formatter: function (value, row, index) {
                        if (value != null) {
                            if (parseInt(value) === 1) {
                                return '是';
                            } else {
                                return '否';
                            }
                        } else {
                            return '--';
                        }
                    }, cellStyle: function (value, row, index) {
                        return {css: {"background": "#FFFFFF"}}
                    }
                },
                {
                    title: '生产令编号', field: 'prodNo',
                    formatter: function (value, row, index) {
                        if (value != null) {
                            return '<a style="width: 90px;" href="javascript:void(0)">' + value + '</a>';
                        } else {
                            return '--';
                        }
                    }, cellStyle: function (value, row, index) {
                        return {css: {"background": "#FFFFFF"}}
                    }
                },
                {
                    title: '生产令数量', field: 'prodNum', width: '120',
                    formatter: function (value, row, index) {
                        if (value != null) {
                            return value;
                        } else {
                            return '--';
                        }
                    }, cellStyle: function (value, row, index) {
                        return {css: {"background": "#FFFFFF"}}
                    }
                }, {
                    title: '生产令状态', field: 'prodManSta', width: '60',
                    formatter: function (value, row, index) {
                        if (value != null) {
                            if (value === 1) {
                                return '<label class="badge label-success">正常</label>';
                            } else if (value === 2) {
                                return '<label class="badge label-danger">终止</label>';
                            }else if (value === 3) {
                                return '<label class="badge label-warning">暂缓</label>';
                            }
                        } else {
                            return '--';
                        }
                    }, cellStyle: function (value, row, index) {
                        return {css: {"background": "#FFFFFF"}}
                    }
                },
                // {
                //     title: '技术资料下达', width: '120',
                //     formatter: function (value, row, index) {
                //         if (row.designStatus === 3) {
                //             return '<a style="width: 120px;" href="javascript:void(0)">已完成&nbsp;' + row.designCompleteDt + '</a>';
                //         } else {
                //             if (row.designPlanDt != null) {
                //                 return '<a style="width: 120px;" href="javascript:void(0)">' + row.designPlanDt + '</a>';
                //             } else {
                //                 return '<a style="width: 120px;" href="javascript:void(0)">暂不提报</a>';
                //             }
                //         }
                //     }, cellStyle: function (value, row, index) {
                //         if (row.designStatus === 3) {
                //             return {css: {"padding": "0", "background": "#00A65A"}}
                //         } else {
                //             return {css: {"padding": "0", "background": "#FFFFFF"}}
                //         }
                //     }
                // },
                // {
                //     title: '工艺下计划', width: '120',
                //     formatter: function (value, row, index) {
                //         if (row.craftStatus === 3) {
                //             if(row.craftCompleteDt != null){
                //                 return '<a style="width: 120px;" href="javascript:void(0)">已完成&nbsp;' + row.craftCompleteDt + '</a>';
                //             }else{
                //                 return '<a style="width: 120px;" href="javascript:void(0)">已完成</a>';
                //             }
                //         } else {
                //             return '<a style="width: 120px;" href="javascript:void(0)">暂不提报</a>';
                //         }
                //     }, cellStyle: function (value, row, index) {
                //         if (row.craftStatus === 3) {
                //             return {css: {"padding": "0", "background": "#00A65A"}}
                //         } else {
                //             return {css: {"padding": "0", "background": "#FFFFFF"}}
                //         }
                //     }
                // },
                // {
                //     title: '外购件计划', width: '120',
                //     formatter: function (value, row, index) {
                //         if (row.purStatus === 3) {
                //             if(row.purCompleteDt != null){
                //                 return '<a style="width: 120px;" href="javascript:void(0)">已完成&nbsp;' + row.purCompleteDt + '</a>';
                //             }else{
                //                 return '<a style="width: 120px;" href="javascript:void(0)">已完成</a>';
                //             }
                //         } else {
                //             if (row.purPlanDt != null) {
                //                 return '<a style="width: 120px;" href="javascript:void(0)">' + row.purPlanDt + '</a>';
                //             } else {
                //                 return '<a style="width: 120px;" href="javascript:void(0)">暂不提报</a>';
                //             }
                //         }
                //     }, cellStyle: function (value, row, index) {
                //         if (row.purStatus === 3) {
                //             return {css: {"padding": "0", "background": "#00A65A"}}
                //         } else {
                //             return {css: {"padding": "0", "background": "#FFFFFF"}}
                //         }
                //     }
                // },
                // {
                //     title: '外协件计划', width: '120',
                //     formatter: function (value, row, index) {
                //         if (row.outStatus === 3) {
                //             if(row.outCompleteDt != null){
                //                 return '<a style="width: 120px;" href="javascript:void(0)">已完成&nbsp;' + row.outCompleteDt + '</a>';
                //             }else{
                //                 return '<a style="width: 120px;" href="javascript:void(0)">已完成</a>';
                //             }
                //         } else {
                //             if (row.outPlanDt != null) {
                //                 return '<a style="width: 120px;" href="javascript:void(0)">' + row.outPlanDt + '</a>';
                //             } else {
                //                 return '<a style="width: 120px;" href="javascript:void(0)">暂不提报</a>';
                //             }
                //         }
                //     }, cellStyle: function (value, row, index) {
                //         if (row.outStatus === 3) {
                //             return {css: {"padding": "0", "background": "#00A65A"}}
                //         } else {
                //             return {css: {"padding": "0", "background": "#FFFFFF"}}
                //         }
                //     }
                // },
                // {
                //     title: '原材料计划', width: '120',
                //     formatter: function (value, row, index) {
                //         if (row.rawMatStatus === 3) {
                //             if(row.rawMatCompleteDt != null){
                //                 return '<a style="width: 120px;" href="javascript:void(0)">已完成&nbsp;' + row.rawMatCompleteDt + '</a>';
                //             }else{
                //                 return '<a style="width: 120px;" href="javascript:void(0)">已完成</a>';
                //             }
                //         } else {
                //             if (row.rawMatPlanDt != null) {
                //                 return '<a style="width: 120px;" href="javascript:void(0)">' + row.rawMatPlanDt + '</a>';
                //             } else {
                //                 return '<a style="width: 120px;" href="javascript:void(0)">暂不提报</a>';
                //             }
                //         }
                //     }, cellStyle: function (value, row, index) {
                //         if (row.rawMatStatus === 3) {
                //             return {css: {"padding": "0", "background": "#00A65A"}}
                //         } else {
                //             return {css: {"padding": "0", "background": "#FFFFFF"}}
                //         }
                //     }
                // },
                // {
                //     title: '工艺编制', width: '120',
                //     formatter: function (value, row, index) {
                //         if (row.processPlanningStatus === 3) {
                //             if(row.processPlanningCompleteDt != null){
                //                 return '<a style="width: 120px;" href="javascript:void(0)">已完成&nbsp;' + row.processPlanningCompleteDt + '</a>';
                //             }else{
                //                 return '<a style="width: 120px;" href="javascript:void(0)">已完成</a>';
                //             }
                //         } else {
                //             if (row.processPlanningPlanDt != null) {
                //                 return '<a style="width: 120px;" href="javascript:void(0)">' + row.processPlanningPlanDt + '</a>';
                //             } else {
                //                 return '<a style="width: 120px;" href="javascript:void(0)">暂不提报</a>';
                //             }
                //         }
                //     }, cellStyle: function (value, row, index) {
                //         if (row.processPlanningStatus === 3) {
                //             return {css: {"padding": "0", "background": "#00A65A"}}
                //         } else {
                //             return {css: {"padding": "0", "background": "#FFFFFF"}}
                //         }
                //     }
                // },
                {
                    title: '下料', width: '120',
                    formatter: function (value, row, index) {
                        if (row.cutStatus === 3) {
                            if (row.cutCompleteDt != null) {
                                return '<a style="width: 120px;" href="javascript:void(0)">已完成&nbsp;' + row.cutCompleteDt + '</a>';
                            } else {
                                return '<a style="width: 120px;" href="javascript:void(0)">已完成</a>';
                            }
                        } else {
                            if (row.cutPlanDt != null) {
                                return '<a style="width: 120px;" href="javascript:void(0)">' + row.cutPlanDt + '</a>';
                            } else {
                                return '<a style="width: 120px;" href="javascript:void(0)">暂不提报</a>';
                            }
                        }
                    }, cellStyle: function (value, row, index) {
                        if (row.cutStatus === 3) {
                            return {css: {"padding": "0", "background": "#00A65A"}}
                        } else {
                            return {css: {"padding": "0", "background": "#FFFFFF"}}
                        }
                    }
                },
                {
                    title: '返焊件', width: '120',
                    formatter: function (value, row, index) {
                        if (row.reflowWeldmentStatus === 3) {
                            if (row.reflowWeldmentCompleteDt != null) {
                                return '<a style="width: 120px;" href="javascript:void(0)">已完成&nbsp;' + row.reflowWeldmentCompleteDt + '</a>';
                            } else {
                                return '<a style="width: 120px;" href="javascript:void(0)">已完成</a>';
                            }
                        } else {
                            if (row.reflowWeldmentPlanDt != null) {
                                return '<a style="width: 120px;" href="javascript:void(0)">' + row.reflowWeldmentPlanDt + '</a>';
                            } else {
                                return '<a style="width: 120px;" href="javascript:void(0)">暂不提报</a>';
                            }
                        }
                    }, cellStyle: function (value, row, index) {
                        if (row.reflowWeldmentStatus === 3) {
                            return {css: {"padding": "0", "background": "#00A65A"}}
                        } else {
                            return {css: {"padding": "0", "background": "#FFFFFF"}}
                        }
                    }
                },
                {
                    title: '机加件（铆焊）', width: '120',
                    formatter: function (value, row, index) {
                        if (row.rivetingAndWeldingOfMachiningPartsStatus === 3) {
                            if (row.rivetingAndWeldingOfMachiningPartsCompleteDt != null) {
                                return '<a style="width: 120px;" href="javascript:void(0)">已完成&nbsp;' + row.rivetingAndWeldingOfMachiningPartsCompleteDt + '</a>';
                            } else {
                                return '<a style="width: 120px;" href="javascript:void(0)">已完成</a>';
                            }
                        } else {
                            if (row.rivetingAndWeldingOfMachiningPartsPlanDt != null) {
                                return '<a style="width: 120px;" href="javascript:void(0)">' + row.rivetingAndWeldingOfMachiningPartsPlanDt + '</a>';
                            } else {
                                return '<a style="width: 120px;" href="javascript:void(0)">暂不提报</a>';
                            }
                        }
                    }, cellStyle: function (value, row, index) {
                        if (row.rivetingAndWeldingOfMachiningPartsStatus === 3) {
                            return {css: {"padding": "0", "background": "#00A65A"}}
                        } else {
                            return {css: {"padding": "0", "background": "#FFFFFF"}}
                        }
                    }
                },
                {
                    title: '铆焊件', width: '120',
                    formatter: function (value, row, index) {
                        if (row.rivetingAndWeldingPartsStatus === 3) {
                            if (row.rivetingAndWeldingPartsCompleteDt != null) {
                                return '<a style="width: 120px;" href="javascript:void(0)">已完成&nbsp;' + row.rivetingAndWeldingPartsCompleteDt + '</a>';
                            } else {
                                return '<a style="width: 120px;" href="javascript:void(0)">已完成</a>';
                            }
                        } else {
                            if (row.rivetingAndWeldingPartsPlanDt != null) {
                                return '<a style="width: 120px;" href="javascript:void(0)">' + row.rivetingAndWeldingPartsPlanDt + '</a>';
                            } else {
                                return '<a style="width: 120px;" href="javascript:void(0)">暂不提报</a>';
                            }
                        }
                    }, cellStyle: function (value, row, index) {
                        if (row.rivetingAndWeldingPartsStatus === 3) {
                            return {css: {"padding": "0", "background": "#00A65A"}}
                        } else {
                            return {css: {"padding": "0", "background": "#FFFFFF"}}
                        }
                    }
                },
                {
                    title: '机加', width: '120',
                    formatter: function (value, row, index) {
                        if (row.machiningStatus === 3) {
                            if (row.machiningCompleteDt != null) {
                                return '<a style="width: 120px;" href="javascript:void(0)">已完成&nbsp;' + row.machiningCompleteDt + '</a>';
                            } else {
                                return '<a style="width: 120px;" href="javascript:void(0)">已完成</a>';
                            }
                        } else {
                            if (row.machiningPlanDt != null) {
                                return '<a style="width: 120px;" href="javascript:void(0)">' + row.machiningPlanDt + '</a>';
                            } else {
                                return '<a style="width: 120px;" href="javascript:void(0)">暂不提报</a>';
                            }
                        }
                    }, cellStyle: function (value, row, index) {
                        if (row.machiningStatus === 3) {
                            return {css: {"padding": "0", "background": "#00A65A"}}
                        } else {
                            return {css: {"padding": "0", "background": "#FFFFFF"}}
                        }
                    }
                },
                {
                    title: '装配', width: '120',
                    formatter: function (value, row, index) {
                        if (row.assemblingStatus === 3) {
                            if (row.assemblingCompleteDt != null) {
                                return '<a style="width: 120px;" href="javascript:void(0)">已完成&nbsp;' + row.assemblingCompleteDt + '</a>';
                            } else {
                                return '<a style="width: 120px;" href="javascript:void(0)">已完成</a>';
                            }
                        } else {
                            if (row.assemblingPlanDt != null) {
                                return '<a style="width: 120px;" href="javascript:void(0)">' + row.assemblingPlanDt + '</a>';
                            } else {
                                return '<a style="width: 120px;" href="javascript:void(0)">暂不提报</a>';
                            }
                        }
                    }, cellStyle: function (value, row, index) {
                        if (row.assemblingStatus === 3) {
                            return {css: {"padding": "0", "background": "#00A65A"}}
                        } else {
                            return {css: {"padding": "0", "background": "#FFFFFF"}}
                        }
                    }
                },
                {
                    title: '发货', width: '120',
                    formatter: function (value, row, index) {
                        if (row.deliverStatus === 3) {
                            if (row.deliverCompleteDt != null) {
                                return '<a style="width: 120px;" href="javascript:void(0)">已完成&nbsp;' + row.deliverCompleteDt + '</a>';
                            } else {
                                return '<a style="width: 120px;" href="javascript:void(0)">已完成</a>';
                            }
                        } else {
                            if (row.deliverPlanDt != null) {
                                return '<a style="width: 120px;" href="javascript:void(0)">' + row.deliverPlanDt + '</a>';
                            } else {
                                return '<a style="width: 120px;" href="javascript:void(0)">暂不提报</a>';
                            }
                        }
                    }, cellStyle: function (value, row, index) {
                        if (row.deliverStatus === 3) {
                            return {css: {"padding": "0", "background": "#00A65A"}}
                        } else {
                            return {css: {"padding": "0", "background": "#FFFFFF"}}
                        }
                    }
                },
                {
                    title: '安装', width: '120',
                    formatter: function (value, row, index) {
                        if (row.installStatus === 3) {
                            if (row.installCompleteDt != null) {
                                return '<a style="width: 120px;" href="javascript:void(0)">已完成&nbsp;' + row.installCompleteDt + '</a>';
                            } else {
                                return '<a style="width: 120px;" href="javascript:void(0)">已完成</a>';
                            }
                        } else {
                            if (row.installPlanDt != null) {
                                return '<a style="width: 120px;" href="javascript:void(0)">' + row.installPlanDt + '</a>';
                            } else {
                                return '<a style="width: 120px;" href="javascript:void(0)">暂不提报</a>';
                            }
                        }
                    }, cellStyle: function (value, row, index) {
                        if (row.installStatus === 3) {
                            return {css: {"padding": "0", "background": "#00A65A"}}
                        } else {
                            return {css: {"padding": "0", "background": "#FFFFFF"}}
                        }
                    }
                }
            ]
        });
        /**
         * 表格搜索
         */
        $("#btn-search").click(function () {
            js.table.search(table);
        });
    });

    /**
     * 重新加载
     */
    function reLoad() {
        js.table.refresh(table);
    }

    /**
     * 控制搜索条件显示还是隐藏
     * @param obj
     */
    function disPlaySearch(obj) {
        let classVal = $(obj).attr("class");
        if (classVal === 'btn btn-success') {
            $(obj).attr("class", "btn btn-warning");
            $("#btn-search-display-i").attr("class", "fa fa-minus");
            $("#div-design-time").show();
            $("#div-craft-time").show();
            $("#div-pur-time").show();
            $("#div-out-time").show();
            $("#div-rawMat-time").show();
            $("#div-processPlanning-time").show();
            $("#div-cut-time").show();
            $("#div-reflowWeldment-time").show();
            $("#div-rivetingAndWeldingOfMachiningParts-time").show();
            $("#div-rivetingAndWeldingParts-time").show();
            $("#div-machining-time").show();
            $("#div-assembling-time").show();
            $("#div-deliver-time").show();
            $("#div-install-time").show();
        } else {
            $(obj).attr("class", "btn btn-success");
            $("#btn-search-display-i").attr("class", "fa fa-plus");
            $("#div-design-time").hide();
            $("#div-craft-time").hide();
            $("#div-pur-time").hide();
            $("#div-out-time").hide();
            $("#div-rawMat-time").hide();
            $("#div-processPlanning-time").hide();
            $("#div-cut-time").hide();
            $("#div-reflowWeldment-time").hide();
            $("#div-rivetingAndWeldingOfMachiningParts-time").hide();
            $("#div-rivetingAndWeldingParts-time").hide();
            $("#div-machining-time").hide();
            $("#div-assembling-time").hide();
            $("#div-deliver-time").hide();
            $("#div-install-time").hide();
        }
    }
</script>
</body>
</html>